home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGSCAL
/
TEGAS31.LZH
/
TEGAS.DOC
< prev
next >
Wrap
Text File
|
1991-06-08
|
22KB
|
517 lines
BBBBBB SSSSS X X BSX International
B B S X X 806 Park Ridge Rd.
BBBBBB SSSS X Apartment A8
B B S X X Durham, NC 27713 USA
BBBBBB SSSSS X X
(Make checks payable to
DAVID JOHNDROW!!!)
I n t e r n a t i o n a l
presents...
TTTTTT EEEEE GGGG AAA SSSSS
TT E G A A S
TT EEEE G GGG AAAAA SSSS
TT E G G A A S
TT EEEEE GGGG A A SSSSS
Tegas 3.0 (C) 1991 BSX International
A Graphics-Editing System for Borland Language Programmers
0.0- Table of Contents
1.0- Welcome to TEGAS!
Introduction to the system.
2.0- Legal Stuff. PLEASE READ!
Explanations of how to distribute, what to pay us, and why
you SHOULD pay us.
3.0- What Should Be In This Software Package And How To Install It
How to make sure you have a complete copy of the TEGAS
system, how to make sure your computer can run it, and how
to install it onto your computer.
4.0- TEGAS.EXE: The EGA Sprite Editor
The ins and outs of the TEGAS.EXE sprite editor.
5.0- Using .TPS Files In Your Programs
Loading .TPS files into your programs from disk.
6.0- Using TEGAS-Created .PAS Files In Your Programs
Incorporating pictures directly into your .EXE files.
7.0- Using TELIB, the .TPS librarian
Packing many .TPS files into one easy-to-use .TLB file.
8.0- Using TELIB-Created .TLB Files In Your Programs
Loading pictures from a .TLB into your programs from disk.
9.0- Some Notes
A few more things you should know.
10.0- About BSX International
What is this BSX deal, anyway?
11.0- Acknowledgements
Who deserves thanks for all this.
12.0- Version Information
The past of TEGAS.
1.0- Welcome to TEGAS!
TEGAS is a system that allows YOU, the programmer, to create and
edit EGA hi-resolution (640x350x16) graphics images for use in
programs written in Borland languages. With TEGAS you can set
individual pixels; flood-fill regions; draw circles, lines and
rectangles; cut; paste; zoom in and out; shift; flip left-to-right or
up-to-down; resize images and more. You can use the Gallery option
to view many image files at once for easy comparison. You can even
customize the EGA color palette, letting you check the effects of
palette changes even as you are creating an image. The TEGAS editor
lets you save files in two ways as well: as .TPS files, which
contain the binary data used by the Turbo Pascal PutImage()
procedure, or as .PAS files, which contain Pascal source for the type
and constant array which define an image. C programmers, who are
always shooting their mouths off about how smart they are, should
have no trouble converting this simple code into C.
In addition to the main editing program TEGAS.EXE, the TEGAS
system includes a utility to allow you to store many image files into
a single file library file that your programs can read. This allows
for savings in disk space, since a single library file uses less space
than the bunch of small files that go into it.
Simply put, TEGAS is the only such full-featured system we know
of, and if you're into programming graphics-intense games and
applications (as we are), you'll find it to be an indispensable tool.
2.0- Legal Stuff. PLEASE READ!
TEGAS 3.0 (C) 1991 BSX International
TEGAS 3.0 was developed and compiled using Borland's Turbo
Pascal 6.0. Graphics were drawn using BSX's own TEGAS utility.
This software is provided "as is" with no guarantees of any
kind. The developers assume no responsibilities other than those
indicated below. You may use and distribute this product as you
wish, but only under the following conditions:
1) You may sell this program without the permission of BSX
International but you MUST NOT alter the program or its
documentation. You MUST NOT charge any fees other than fees
for copying and MUST clearly state that this fee is NOT a
substitute for registration with BSX.
2) Do not distribute this product if it has been reduced in any way.
You may add files, but you may not remove any of the originals.
3) Under no circumstances may you remove the copyright notices from
the programs or documentation.
***** THIS IS A SHAREWARE PROGRAM. IF YOU USE IT, YOU MUST SEND *****
***** $10 (US), OR $12 (CANADIAN) TO: *****
***** *****
***** BSX INTERNATIONAL *****
***** 806 PARK RIDGE RD. APT. A8 *****
***** DURHAM, NC 27713 *****
***** *****
***** IMPORTANT: MAKE CHECKS PAYABLE TO "DAVID JOHNDROW" *****
***** *****
***** READ BSXCAT.DOC AND ORDER.DOC FOR FULL CATALOG AND *****
***** ORDERING INFORMATION! THANKS! *****
3.0- What Should Be In This Software Package And How To Install It
This system contains AT LEAST the following files:
TEGAS.EXE -The executable program for the TEGAS editor.
TEGAS.DOC -This document.
TEGAS.ICO -Windows 3.0 icon file for those who want to use TEGAS
from Windows.
TELIB.EXE -The executable program for the TELIB sprite
librarian.
BSXCAT.DOC -BSX International catalog.
ORDER.DOC -BSX International order form. E Z 2 Use!
System requirements:
IBM PC,XT,AT,PS/2 or compatible.
256K RAM at the very least.
EGA or VGA card with 256K of memory.
Microsoft Mouse or compatible.
DOS 2.1 or later.
To install the TEGAS system onto a disk (floppy or hard drive),
just create a directory for it (we suggest naming the directory
TEGAS...why not?). Then just put TEGAS.EXE and TELIB.EXE into that
directory and you're ready to go. TEGAS and TELIB use no external
files themselves, so you may use them from anywhere.
Included with TEGAS is TEGAS.ICO, a Windows 3.0 icon for
TEGAS.EXE, ready to use for those of you who want to run TEGAS from
Windows 3.0. TEGAS is NOT a Windows application, but will run fine
as a DOS app under Windows.
4.0- TEGAS.EXE: The EGA Sprite Editor
TEGAS.EXE can be run by just typing TEGAS. If TEGAS.EXE is in
your PATH, you may run TEGAS from anywhere, otherwise you must cd to
the directory holding TEGAS.EXE and run it from there, or include the
full pathname of the directory when you call TEGAS from the DOS
prompt. Read the DOS manual if you aren't clear on directories and
paths and such things.
To start TEGAS so that it will run without making any noise, use
the -s command line switch, as in "tegas -s".
When you first start TEGAS.EXE, you may choose NEW (to create a
new sprite), or LOAD or GALLERY (which let you load existing sprite
files from disk). Once you're editing a sprite, you may choose icons
by clicking on them. You may pick the current color by clicking on
its square at the top of the screen, or by hitting the RIGHT mouse
button on a pixel in the drawing area (this will set the current color
to the color of the pixel under the mouse cursor).
The available icons are:
EXIT: Lets you leave TEGAS and return to the operating system.
Don't worry; it asks if you want to save the current sprite.
A WORD OF CAUTION: SAVE saves what is currently displayed
in the view window. Therefore, if you are zoomed in, SAVE will
save the zoomed-in region only. This is handy for cutting little
sprites out of big ones. BUT BE CAREFUL NOT TO OVERWRITE THE BIG
SPRITE YOU WERE WORKING ON. Zoom out to save it.
LOAD PIC: This puts up a menu of all the .TPS files in the current
directory. Just click on an entry to load and edit it. NOTE: if
you have more than 255 .TPS files in a given directory, TEGAS
will only display the first 255. It's a good idea not to exceed
this number.
SAVE PIC: Saves the current picture. CAUTION: anytime you SAVE a
pic, the image saved is that in the little window above the
option buttons. So if you save while zoomed in, for instance, you
save only the zoomed region. It's all quite self-evident.
The picture is saved as a .TPS first, then you are prompted
as to whether you also want to save it as a .PAS.
NEW: Lets you create a new image. Use the mouse to pick the
size. If the desired size is greater than 100x60 pixels, you
will be prompted to type in the width and height in pixels. You
may choose sizes up to 400x200. Now THAT'S big.
ANOTHER WARNING: You can't save really humongous sprites to
.PAS because that would result in too-big .PAS files. If you try
you'll just get a goofy-looking .PAS file.
DRAW: This selects draw, the default mode. Pixels are set
individually by clicking on them.
FILL: Flood-fills a region with the current color. Click on a
pixel and all contiguous pixels of that color will be replaced by
the current color.
LINE: Draws a line in the current color. Just click on the
endpoints.
CIRCLE: Draws a circle in the current color. Just click on the
pixel where you want the center to be, and click again on a pixel
to be on the circumference. Partial circles (arcs), clipped by
the edge of the picture, are OK.
GALLERY: Lets you view and pick out .TPS files by just clicking on
them. Note: just like LOAD, it is recommended that you keep less
than 255 .TPS files in a directory.
FLIP/FLOP: Lets you flip the image left-to-right or top-to-bottom.
SHIFT: Lets you shift part or all of the image either up, down, to
the left, or to the right.
RESIZE: With RESIZE you can make the image larger or smaller, using
a sizing method like that in NEW.
GRID: Toggles whether or not to display an overlaid grid over the
picture. Not available with very large sprites due to their size.
COPY ETC: Allows you to perform operations on parts of the sprite.
You can: COPY a region to another location; (exact copy)
MOVE a region; (leaves a hole)
OVERLAY a region; (background color not written)
ERASE a region; (leaves a hole, also)
WASH a region; (replace one color with another)
LOAD another image file (.TPS) into a specified location;
(uses the image overlay option)
ZOOM: Lets you zoom in and work on a region, then if you click on
ZOOM again, you can zoom back out.
PALETTE: You can change the EGA palette with this option.
SAVE PAL: Saves the current palette to a file called PALETTE.CFG. To
clear the palette changes, you may erase PALETTE.CFG any time and
restore the default palette.
RECTANGLE: Draws a rectangle in the current color. Click on opposite
corners of the rectangle.
VIEW ARROWS: If the actual-size picture is too big to fit in the view
window, use these arrows to scoot around.
5.0- Using .TPS Files In Your Programs
TEGAS produces .TPS files. These files contain the exact infor-
mation stored in memory by the GetImage procedure and used by PutImage
to put a picture on the screen. Therefore all you have to do in your
programs is load the .TPS into memory (an array or a pointer), and
call PutImage to display it. Nothing up my sleeve -Presto! Couldn't
be simpler. Here's an example:
program MyStuff;
uses CRT,graph;
var
MSFile :file;
buffer :pointer;
MSSize :word;
.
.
{Put video into hi-res EGA mode}
.
.
procedure LoadMysprite;
begin
Assign(MSFile,'MYSPRITE.TPS');
Reset(MSFILE,1);
MSSize:=ImageSize(0,0,59,39);
GetMem(buffer,MSSize);
BlockRead(MSFile,buffer^,MSSize);
Close(MSFile);
PutImage(200,200,buffer^,NormalPut);
FreeMem(buffer,MSSize);
end;
begin
.
.
.
LoadMysprite;
Repeat until Keypressed;
end.
Note that we used ImageSize to get the amount of memory needed,
but that was hardly necessary, since the size of the .TPS file in
bytes is exactly the value given by ImageSize. A .TPS of a 60x40
image is 1286 bytes long. Just load the whole file into a big-
enough region of memory, and you're sittin pretty.
Anyhow, you get the idea.
6.0- Using TEGAS-Created .PAS Files In Your Programs
A .PAS file created by TEGAS has the same name as the .TPS for
that picture. Hence DOOFUS.TPS will be accompanied by DOOFUS.PAS.
Now, DOOFUS.PAS will, for example, look like the stuff here
between the dotted lines:
--------------------------------
TYPE
DOOFUSType = array[1..3074] of byte;
CONST
DOOFUS: DOOFUSType = (97,0,58,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,4,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,32,
0,0,0,0,0,0,0,0,0,0,4,0,32,0,0,0,0,0,0,0,0,0,0,4,0,32,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,32,0,0,0,0,0,0,0,0,0,0,
.
.
BUNCH OF STUFF OMITTED
.
.
2,0,32,0,0,0,0,0,0,0,0,0,0,2,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,2,0,32,0,0,0,0,0,0,0,0,0,0,2,0,64,0,0,0,0,0,0,0,
0,0,0,2,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,
64,0,0,0,0,0,0,0,0,0,0,1,143,192,0,0,0,0,0,0,0,0,0,0,1,143,192,
.
.
BUNCH OF STUFF OMITTED
.
.
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,143,192,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
--------------------------------
We omitted some lines for brevity in the above example. Anyhow,
you may use the $I compiler directive to include the .PAS file into
your program, up top in the area where CONST and TYPE declarations
are made. Just put
{ $I DOOFUS.PAS }
Now you need only say:
PutImage(50,50,DOOFUS,NormalPut);
to put this image at 50,50. Neat, huh? The data is compiled right
your .EXE file. A simpler way to incorporate graphics into a program
has never been invented. And WE invented it. Cuz we're so darn good.
7.0- Using TELIB, The TPS Librarian
Using individual .TPS files is OK, if you only have a few of
them. And incorporating TEGAS-created .PAS files into your .EXE is
fine if it isn't going to be a problem that ALL that data will be in
memory ALL the time. But what if you have LOTS of .TPS images and you
don't want all those little files sitting around taking up at least
2K apiece on the drive? And you don't want all that data in your .EXE
file using memory even when no longer needed? SIMPLE: Use TELIB to
create one or more .TLB files.
TELIB actually creates two files:
1) The .TLB file, which is simply the data from one or more .TPS files
all stuck together, and
2) The .TXT file, which contains ASCII data on the names, positions,
and sizes of the .TPSs that have been put into the .TLB.
The command line calling conventions for TELIB is like this:
TELIB libname tpsname
TELIB adds .TPS files to a .TLB one at a time. It's most conven-
ient therefore to put multiple calls to TELIB in a batch file to
create a given .TLB. The batch file should include erase statements
at the beginning to get rid of any old versions of the .TLB and .TXT
so TELIB can create new ones from scratch.
EXAMPLE: Let's say you have four .TPS files of 98x59 pixels,
named SQUID.TPS, GEEK.TPS, CONCH.TPS, and THROAT.TPS, and you want to
make a .TLB called TEST.TPB from them. So you make a batch file called
MKTEST.BAT that looks like this here between the lines:
--------------------------------
erase test.tlb
erase test.txt
telib test squid
telib test geek
telib test conch
telib test throat
--------------------------------
Now you'll find files called TEST.TLB and TEST.TXT in the
directory. TEST.TXT will look like this:
--------------------------------
TEST.TLB entries
----------------------------------------------------------------------
| TPS Name | TPS Size | Start Position in Lib
----------------------------------------------------------------------
SQUID 3074 0
----------------------------------------------------------------------
GEEK 3074 3074
----------------------------------------------------------------------
CONCH 3074 6148
----------------------------------------------------------------------
THROAT 3074 9222
----------------------------------------------------------------------
--------------------------------
8.0- Using TELIB-Created .TLB Files In Your Programs
Your Pascal program now can have its way with the contents of
the .TLB. You can do four successive BlockReads to load all four pics
into memory. Or you can use Seek() to randomly access different pics
at different times and load them only when you need them. It's just
as easy as having all those .TPSs lying around, but you don't have to
put up with all the clutter.
program MyStuff;
uses CRT,graph;
const
SquidSize = 3074;
var
MLFile :file;
Squid,Geek,Conch,Throat :pointer;
.
.
{Put video into hi-res EGA mode}
.
.
procedure LoadSquidAndThroat;
begin
Assign(MLFile,'TEST.TLB');
Reset(MLFile,1);
GetMem(Squid,SquidSize);
GetMem(Throat,SquidSize);
BlockRead(MLFile,Squid^,SquidSize);
Seek(MLFile,9222);
BlockRead(MLFile,Throat^,SquidSize);
Close(MLFile);
PutImage(100,100,Squid^,NormalPut);
PutImage(200,200,Throat^,NormalPut);
FreeMem(Squid,SquidSize);
FreeMem(Throat,SquidSize);
end;
begin
.
.
.
LoadSquidAndThroat;
Repeat until Keypressed;
end.
9.0- Some Notes
Look, the best way to learn to use the TEGAS system is to mess
around with it. Just fire her up and let her rip. In no time you'll
be ready to use TEGAS for all your EGA programming needs. You'll be
smacking yourself on the forehead saying "how DID I get along without
this thing?"
And hey, don't feel like there's any need to keep the extensions
".TPS" and ".TLB" for files in your software packages. Once you're
done creating them with the TEGAS system, you can rename them to
whatever you want.
10.0- About BSX International
BSX International came to life under the nurturing, networking,
and significant othering of Bob Roberds, a dude in Durham, North
Carolina. Tegas 3.0 was brought into being thru the efforts of David
Johndrow, another hard-working Durham guy who shares the Bobmeister's
enthusiasm for graphics games programming on PC systems. Support
them, won't you? You'll be glad you did.
11.0- Acknowledgements
Kudos to everyone who has has registered BSX International
programs!
Bob would like to thank all those who've taken the time to
suggest improvements to BSX stuff. Thanks as always to LRG for stuff.
12.0- Version Information
Version 3.0 released 8 Jun. 91. Major enhancements and improve-
ments. Addition of Gallery, Shift, Copy, Zoom, Grid, and Resize
options. Saving to .PAS added. TELIB included.
Version 2.2 released 16 Oct. 90. Miscellaneous buglets trampled
upon, including odious zero-radius circle boo-boo. Hideous BSX
mousebug removed, as it was from all things.
Version 2.1 released 18 Jan. 90. Color and icon changes to make
TEGAS easier on the old eyes. Clueless idiot realizes that it's
apartment "A8", not "8A", fer crimminy's sake.
Version 2.0 released 9 Jan. 90. Graphics sped and cleaned up.
TVGAS-style intelligent "save as" questioning implemented.
Version 1.1 released 23 Sept. 89. Flickering mouse cursor de-
flicked. Clueless fool learns left from right and fixes NEW message
accordingly.
Version 1.0 released 22 Sept. 89. Initial release.